#include <54func.h>
int main(int argc,char *argv[])
{
    // ./4_read_nonblock fil1
    ARGS_CHECK(argc,2);
    int fd = open(argv[1],O_RDWR);
    ERROR_CHECK(fd,-1,"open");
    char buf[3] = {0};
    while(1)
    {
        bzero(buf,sizeof(buf));
        ssize_t sret = read(fd,buf,2);
        printf("buf = %s\n",buf);
        if(sret == 0){
            break;
        }
        sleep(1);
    }
    return 0;
}
